/*
 * xexception.h
 *
 *  Created on: Aug 25, 2011
 *      Author: lindenb
 */

#ifndef XEXCEPTION_H_
#define XEXCEPTION_H_

#include <sstream>
#include <stdexcept>

#define THROW(a) do {\
    std::ostringstream _os;\
    _os << "[ERROR]"<< __FILE__ <<":"<<__LINE__\
	<<":" << a << "\n";\
    throw std::runtime_error(_os.str());\
    } while(false)

#endif /* XEXCEPTION_H_ */
